import React, { FC } from 'react';
import { Button, Space } from 'antd';
import { withRouter, RouteComponentProps } from 'react-router-dom';

const Home: FC<RouteComponentProps> = ({ history }) => {
  return (
    <div className="home">
      <h1>
        <span className="wow bounceInLeft">Daily</span>
        &nbsp;
        <span className="wow bounceInRight">Learning</span>
      </h1>
      <h2>Webpack5 + React + TypeScript</h2>
      <Space>
        <Button
          className="btn"
          onClick={() => {
            history.push('/console/test_home_page/G2Plot');
          }}
        >
          View on Learning
        </Button>
        <Button
          className="btn"
          type="primary"
          onClick={() => {
            window.open('https://gitee.com/ajaxget/webpack-test-web');
          }}
        >
          View on Gitee
        </Button>
      </Space>
    </div>
  );
};

export default withRouter(Home);
